
export default function (response) {

  const {
    data: {code, msg, data}
  } = response;

  return code === 0 ? Promise.resolve(data) : Promise.reject(msg);
}


